package com.sunlake.spring.main.common.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author liuha
 */
public class LoggerUtil {
    // 私有构造函数防止实例化
    private LoggerUtil() {}

    // 获取指定类的Logger实例
    public static Logger getLogger(Class<?> clazz) {
        return LoggerFactory.getLogger(clazz);
    }

    // 全局日志方法示例
    public static void info(Class<?> clazz, String message) {
        getLogger(clazz).info(message);
    }

    public static void error(Class<?> clazz, String message, Throwable throwable) {
        getLogger(clazz).error(message, throwable);
    }

}